package com.zzx.project.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.zzx.project.entity.Leavingmessage;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface LmDao extends BaseMapper<Leavingmessage> { //留言Dao
    //根据用户id获取对应留言
    List<Leavingmessage> getMessagesById(@Param("uid") int id);
    //添加留言
    int addMessage(@Param("leavingmessage") Leavingmessage leavingmessage);
    //获取所有留言条数
    int getMessageCount();
}
